Lapo Calamandrei [Thu, 16 Oct 2014 12:22:20 +0000 (14:22 +0200)]
Adwaita: list row hover color
Now it's based of fg color, so the list row gets darker on the
bright variant and brighter on the dark variant, similarly to what
we do for spinbutton buttons.
Lapo Calamandrei [Thu, 16 Oct 2014 12:12:13 +0000 (14:12 +0200)]
Adwaita: tweak list row transition
Thanks to Carlos Soriano expertise.
Alexander Larsson [Thu, 16 Oct 2014 10:58:43 +0000 (12:58 +0200)]
X11: Fix crash in gdk_x11_gl_context_texture_from_surface
We need to look at the impl_window for the gl rendering, not
the subwindow we're rendering into.
Lapo Calamandrei [Thu, 16 Oct 2014 10:46:58 +0000 (12:46 +0200)]
Adwaita: avoid border clash on transitioning adiacent flat buttons
Flat buttons gets the button decoration on hover, while transitioning
the decorations of adiacent flat buttons are both shown (one fading in
and the other fading out) so the borders clashes, since normally there's
no spacing between them, to avoid it the transition on the normal state
is set to none and added back to the hover state, so the decoration
won't fade out. To make the transition more evident the duration is
increased.
Matthias Clasen [Thu, 16 Oct 2014 01:53:53 +0000 (21:53 -0400)]
widget-factory: Add a missing scrolled window
Matthias Clasen [Thu, 16 Oct 2014 01:42:12 +0000 (21:42 -0400)]
widget-factory: Add some vertical examples
This adds both a vertical toolbar and vertically linked buttons.
Benjamin Otte [Thu, 16 Oct 2014 01:31:30 +0000 (03:31 +0200)]
glarea: Display the error message when an error occurred
Simply center a PangoLayout with the message text.
Benjamin Otte [Thu, 16 Oct 2014 01:13:45 +0000 (03:13 +0200)]
gdk: Add GDK_DEBUG=nogl
This is mostly useful for fallback testing.
I suppose if people want finer grained GL ability testing, they can use
Mesa environment variables to tune things.
Lapo Calamandrei [Wed, 15 Oct 2014 18:41:19 +0000 (20:41 +0200)]
Adwaita: color treeview tree/grid lines
Tree lines are visible now, unfortunatelly grid lines do not react
to selected state so they are way too bright.
Matthias Clasen [Wed, 15 Oct 2014 18:41:42 +0000 (14:41 -0400)]
Avoid deprecation warnings
We don't really care if we use deprecated API inside deprecated
code, so just ignore the warning.
Matthias Clasen [Wed, 15 Oct 2014 18:37:25 +0000 (14:37 -0400)]
Revert "gtktrayicon-x11: Stop using set_double_buffered"
This reverts commit
4a72563c7b801052f4291a4757bd1011946677b9.
It turns out that this commit broke statusicons under Xfce when
not using a compositor.
https://bugzilla.gnome.org/show_bug.cgi?id=737986
Lapo Calamandrei [Wed, 15 Oct 2014 17:49:13 +0000 (19:49 +0200)]
Adwaita: fix colorchooser styling after latest gtk changes
...commenting stuff pretty accuratelly in the process, since the
widget is quite unobvious to figure out.
Benjamin Otte [Wed, 15 Oct 2014 15:18:26 +0000 (17:18 +0200)]
scrolledwindow: Don't set .frame on overshoot boxes
Benjamin Otte [Sun, 12 Oct 2014 21:43:48 +0000 (23:43 +0200)]
stylecontext: Make save/restore create a child CSS node
This is a change for how CSS is applied.
Previously, subelements (I'll take GtkEntry icons as an example) were
treated as having the same parent as the regular elements. So a selector
such as
.entry
would match an entry inside a window. But it'd also match the icon image
inside the entry. So CSS like
.entry { padding: 10px; }
would add 10px of padding to both the entry itself and to the icon image
inside the entry, so the icon would effective have 20px padding. To get
around that, one would have to unset it again like so:
.entry { padding: 10px; }
.entry.image { padding: unset; }
This is getting more and more of a problem as we make subelements
respect more properties that aren't inherited by default anyway, like
backgrounds and padding/margin/border.
This patch has one caveat though: It makes calling
gtk_style_context_save() the first time have an important side effect.
It's important to audit code to make sure it is only used for
subelements.
And last but not least, this patch is only useful if code unsets
parent's style classes that it doesn't want to apply any longer. Because
style classes are inherited by default (and I don't think we want to
change that), the example will still apply until the subelements no
longer contain the .entry style class.
Benjamin Otte [Sun, 12 Oct 2014 21:38:04 +0000 (23:38 +0200)]
stylecontext: Move next pointer out of GtkStyleInfo
Instead, keep a GSList in the style context.
Benjamin Otte [Sat, 11 Oct 2014 18:02:27 +0000 (20:02 +0200)]
stylecontext: Don't cache the root values
Those are the ones that are special and get animated. Caching them only
causes confusion.
Benjamin Otte [Sat, 11 Oct 2014 00:41:15 +0000 (02:41 +0200)]
stylecontext: Factor out a function
Carlos Garnacho [Sun, 12 Oct 2014 11:22:43 +0000 (13:22 +0200)]
scrolledwindow: Allow overshooting on scroll events
The overshoot visual notification is probably also nice to have in this
context.
https://bugzilla.gnome.org/show_bug.cgi?id=738533
Lars Uebernickel [Wed, 15 Oct 2014 14:15:35 +0000 (16:15 +0200)]
Add GDK_DEP_LIBS to demos and tests
Some of them depend on libepoxy now.
Matthias Clasen [Wed, 15 Oct 2014 03:59:51 +0000 (23:59 -0400)]
GtkPlacesSidebar: Don't leak an icon
Found in valgrind.
Matthias Clasen [Wed, 15 Oct 2014 03:59:25 +0000 (23:59 -0400)]
GtkFontChooserWidget: Plug several memleaks
These were showing up in valgrind.
Matthias Clasen [Wed, 15 Oct 2014 03:58:37 +0000 (23:58 -0400)]
GtkContainerAccessible: avoid resurrecting accessibles
When removing a child, we don't want to resurrect its
accessible needlessly.
Matthias Clasen [Wed, 15 Oct 2014 02:46:26 +0000 (22:46 -0400)]
Plug a memory leak
We were leaking cairo regions every time we draw.
Benjamin Otte [Wed, 15 Oct 2014 00:08:02 +0000 (02:08 +0200)]
render: Fix uninitialized variables
Refactoring for performance in
39097ea2da79fa1ce79fb291dc5588260e992a5f
caused border_width to be uninitialized when rendering border images.
https://bugzilla.gnome.org/show_bug.cgi?id=738483
Carlos Garnacho [Sun, 12 Oct 2014 12:01:03 +0000 (14:01 +0200)]
scrolledwindow: Simplify _gtk_scrolled_window_set_adjustment_value()
The two boolean arguments always received the same values, so wipe these
out. Likewise, the boolean return value is unused and sort of meaningless.
Carlos Garnacho [Tue, 14 Oct 2014 13:30:34 +0000 (15:30 +0200)]
window: unset menubar before unsetting focus on dispose()
If the menubar has an app-menu popover, and it is shown at the time of
disposing the window, it will attempt to transfer focus back to the
previous focus widget when undoing modality, even though the dispose()
code already did set_focus(NULL) previously.
At the time the popover is removed, there aren't many hints as to whether
the toplevel or the focus widget are being destroyed (ie. not still under
in_destruction), so just swap the order of these two calls.
For every other popover, this would all happen within dispose/destroy,
which is handled better.
Benjamin Otte [Tue, 14 Oct 2014 12:33:08 +0000 (14:33 +0200)]
tests: Make gtkgears compile without complaints
Benjamin Otte [Tue, 14 Oct 2014 12:32:57 +0000 (14:32 +0200)]
inspector: Add missing files
Benjamin Otte [Tue, 14 Oct 2014 12:01:42 +0000 (14:01 +0200)]
inspector: Replace reload with record
and when pressed, record instance counts at 1fps.
Benjamin Otte [Tue, 14 Oct 2014 11:51:09 +0000 (13:51 +0200)]
inspector: Add a graph cell renderer
... and use it to display graphs for how object counts changed.
Benjamin Otte [Tue, 14 Oct 2014 10:59:18 +0000 (12:59 +0200)]
inspector: Add a GraphData object for recording data
This way we can keep more data than just the 2 last values.
Benjamin Otte [Mon, 13 Oct 2014 08:20:29 +0000 (10:20 +0200)]
inspector: Kepp tree iter in type data
This way we don't have to clear/refill the model every time but can keep
the existing model and only update the values.
A nice side benefit is that running an update keeps the current selection.
Benjamin Otte [Mon, 13 Oct 2014 08:19:34 +0000 (10:19 +0200)]
inspector: Make all statistics columns visible always
Benjamin Otte [Mon, 13 Oct 2014 08:09:48 +0000 (10:09 +0200)]
inspector: Update all statistics in same place
Benjamin Otte [Mon, 13 Oct 2014 04:09:35 +0000 (06:09 +0200)]
inspector: increase type by right amount
It's a shift, so we better shift it!
Benjamin Otte [Mon, 13 Oct 2014 04:01:51 +0000 (06:01 +0200)]
inspector: Add type column to statistics
Rename old type column to "type name"
Benjamin Otte [Mon, 13 Oct 2014 03:30:33 +0000 (05:30 +0200)]
inspector: Split out a function
Piotr Drąg [Mon, 13 Oct 2014 18:21:09 +0000 (20:21 +0200)]
Updated POTFILES.in
Matthias Clasen [Mon, 13 Oct 2014 16:44:02 +0000 (12:44 -0400)]
GtkBox: Ensure we only allow one center child
Glade was happily adding multiple center widgets. Oops.
Matthias Clasen [Sun, 12 Oct 2014 04:14:56 +0000 (00:14 -0400)]
Add GdkGLProfile and GdkGLError to the docs
Matthias Clasen [Sun, 12 Oct 2014 04:12:48 +0000 (00:12 -0400)]
Pedantic formatting fix
Matthias Clasen [Sun, 12 Oct 2014 03:55:53 +0000 (23:55 -0400)]
Drop a reference to GtkGLArea::create-context
The signal no longer exists.
Matthias Clasen [Sun, 12 Oct 2014 03:35:52 +0000 (23:35 -0400)]
Nitpicky documentation changes
Matthias Clasen [Sun, 12 Oct 2014 03:32:19 +0000 (23:32 -0400)]
Nitpicky documentation fixes
Matthias Clasen [Sun, 12 Oct 2014 03:20:53 +0000 (23:20 -0400)]
Correct another Since tag
Matthias Clasen [Sun, 12 Oct 2014 03:17:34 +0000 (23:17 -0400)]
Trivial formatting fixes
Matthias Clasen [Sun, 12 Oct 2014 03:04:40 +0000 (23:04 -0400)]
Correct copyright year
Matthias Clasen [Sun, 12 Oct 2014 02:54:49 +0000 (22:54 -0400)]
Correct Since tags
Alexander Larsson [Thu, 9 Oct 2014 15:24:21 +0000 (17:24 +0200)]
gl: Make gdk_gl_context_make_current() return void
Its not really reasonable to handle failures to make_current, it
basically only happens if you pass invalid arguments to it, and
thats not something we trap on similar things on the X drawing side.
If GL is not supported that should be handled by the context creation
failing, and anything going wrong after that is essentially a critical
(or an async X error).
Alexander Larsson [Thu, 9 Oct 2014 14:22:56 +0000 (16:22 +0200)]
X11 GdkGLContext: Remove spurious XSync
This XSync doesn't seem to be necessary. Remove it until otherwise
proven.
Alexander Larsson [Thu, 9 Oct 2014 14:22:47 +0000 (16:22 +0200)]
Fix warning
Alexander Larsson [Thu, 9 Oct 2014 14:09:05 +0000 (16:09 +0200)]
gl: Make all user GdkGLContexts not attached to any window
We make user facing gl contexts not attached to a surface if possible,
or attached to dummy surfaces. This means nothing can accidentally
read/write to the toplevel back buffer.
Alexander Larsson [Thu, 9 Oct 2014 09:25:50 +0000 (11:25 +0200)]
Add glarea demo to gtk3-demo
Alexander Larsson [Thu, 9 Oct 2014 09:16:51 +0000 (11:16 +0200)]
Add tests/testglblending
This test stacks GL and cairo rendering in various
orders to test the layer handling.
Alexander Larsson [Thu, 9 Oct 2014 09:16:11 +0000 (11:16 +0200)]
Add tests/gdkgears
A more complex test modeled on the traditional glxgears.
Alexander Larsson [Thu, 9 Oct 2014 09:14:09 +0000 (11:14 +0200)]
Add tests/testglarea
This is a very simple test of GtkGLArea.
Alexander Larsson [Thu, 9 Oct 2014 09:11:32 +0000 (11:11 +0200)]
Add GtkGLArea widget
Alexander Larsson [Thu, 9 Oct 2014 09:06:48 +0000 (11:06 +0200)]
wayland: Add OpenGL support
This uses EGL to implement GdkGLContext for wayland.
Alexander Larsson [Thu, 9 Oct 2014 09:04:51 +0000 (11:04 +0200)]
wayland: Set GdkVisual::bits_per_rgb to 8
This was 0 before.
Alexander Larsson [Thu, 9 Oct 2014 09:03:47 +0000 (11:03 +0200)]
Add GDK_ALWAYS_USE_GL debug hack
If this is set we always use GL to render each window, even
if there are no GL widgets in the window.
Alexander Larsson [Thu, 9 Oct 2014 08:45:44 +0000 (10:45 +0200)]
gdk: Add support for OpenGL
This adds the new type GdkGLContext that wraps an OpenGL context for a
particular native window. It also adds support for the gdk paint
machinery to use OpenGL to draw everything. As soon as anyone creates
a GL context for a native window we create a "paint context" for that
GdkWindow and switch to using GL for painting it.
This commit contains only an implementation for X11 (using GLX).
The way painting works is that all client gl contexts draw into
offscreen buffers rather than directly to the back buffer, and the
way something gets onto the window is by using gdk_cairo_draw_from_gl()
to draw part of that buffer onto the draw cairo context.
As a fallback (if we're doing redirected drawing or some effect like a
cairo_push_group()) we read back the gl buffer into memory and composite
using cairo. This means that GL rendering works in all cases, including
rendering to a PDF. However, this is not particularly fast.
In the *typical* case, where we're drawing directly to the window in
the regular paint loop we hit the fast path. The fast path uses opengl
to draw the buffer to the window back buffer, either by blitting or
texturing. Then we track the region that was drawn, and when the draw
ends we paint the normal cairo surface to the window (using
texture-from-pixmap in the X11 case, or texture from cairo image
otherwise) in the regions where there is no gl painted.
There are some complexities wrt layering of gl and cairo areas though:
* We track via gdk_window_mark_paint_from_clip() whenever gtk is
painting over a region we previously rendered with opengl
(flushed_region). This area (needs_blend_region) is blended
rather than copied at the end of the frame.
* If we're drawing a gl texture with alpha we first copy the current
cairo_surface inside the target region to the back buffer before
we blend over it.
These two operations allow us full stacking of transparent gl and cairo
regions.
Alexander Larsson [Thu, 9 Oct 2014 08:18:02 +0000 (10:18 +0200)]
Add gdk_window_mark_paint_from_clip and call from widget drawing
This is a new function that gets called every time we're drawing
some area in the Gtk paint machinery. It is a no-op right now, but
it will be required later to keep track of what areas which
we previously rendered with GL was overwritten with cairo contents.
Alexander Larsson [Thu, 9 Oct 2014 08:09:51 +0000 (10:09 +0200)]
Change the way the update area is tracked during paint
First of all we track the current update area during an
update in window->active_update_area. This will be used later
in end_paint to know the damaged area.
Secondly we keep track of old update areas for the last 2
frames. This will later allow us to reuse old framebuffer
contents in double or tripple buffer setups, only painting
what has changed since then.
Alexander Larsson [Thu, 9 Oct 2014 07:58:36 +0000 (09:58 +0200)]
Add internal gdk_cairo_region_from_clip helper
This extract the current cairo clip region if possible and
returns it as a cairo_region_T. It will be needed by later code.
Emmanuele Bassi [Wed, 2 Jul 2014 12:15:01 +0000 (13:15 +0100)]
build: Require libepoxy
If we want to use OpenGL in GDK then we have two choices; either:
- find the GL headers on each platform
- do extension discovery
- implement all the crazy dlopen()/dlsym() dispatch tables
*or* use libepoxy, which shields us from all this madness and provides a
decent layer for GL clients to use, without creating its own namespace.
Epoxy is also used by other projects, like Xorg and piglit, and it's
portable to all the platforms GDK cares about.
https://bugzilla.gnome.org/show_bug.cgi?id=119189
Marek Kasik [Fri, 10 Oct 2014 11:36:30 +0000 (13:36 +0200)]
Get duplex option via IPP
Request "sides-supported" and "sides-default" attributes through
IPP if there is no PPD for selected printer.
Pass "sides" option with other options in printer_get_options().
Add function setup_ipp_option() for creating of IPP option
of given name with passed choices and default value.
Mark such an option as "is-ipp-option" so we can distinguish it
later.
https://bugzilla.gnome.org/show_bug.cgi?id=725441
Jasper St. Pierre [Mon, 13 Oct 2014 09:15:41 +0000 (02:15 -0700)]
gdkwindow-x11: Fix graphical regression from
5e325c4
Before
5e325c4, the default BitGravity was NorthWestGravity.
When static gravities were removed in
5e325c4, the BitGravity regressed
to the X11 default, Forget. Forget causes giant graphical glitches and
black flashes when resizing, especially in some environments that aren't
synchronized to a paint clock yet, like XWayland.
I'm assuming that the author assumed that the default of BitGravity was
NorthWestGravity, which is the default of WinGravity. Just go ahead and
fix this regression to make resizing look smooth again.
Benjamin Otte [Mon, 13 Oct 2014 02:35:24 +0000 (04:35 +0200)]
switch: Use trough style class by default
This allows animating the trough, and saves a save/restore pair.
Benjamin Otte [Mon, 13 Oct 2014 02:23:02 +0000 (04:23 +0200)]
switch: Set PRELIGHT state on widget
Benjamin Otte [Mon, 13 Oct 2014 02:10:07 +0000 (04:10 +0200)]
progressbar: Make the trough the default element
Gets rid of a bunch of save/restore calls and allows animating the
background (but not the slider, booo!)
Benjamin Otte [Mon, 13 Oct 2014 02:00:44 +0000 (04:00 +0200)]
viewport: Remove wrong save/restore
Matthias Clasen [Sun, 12 Oct 2014 22:54:44 +0000 (18:54 -0400)]
GtkListBox: Support placeholders in ui files
This makes the gtk_list_box_set_placeholder functionality
available from GtkBuilder
https://bugzilla.gnome.org/show_bug.cgi?id=738111
Matthias Clasen [Sun, 12 Oct 2014 22:18:04 +0000 (18:18 -0400)]
GtkSearchBar: don't peek out
When the searchbar is hidden, a 1-pixel-high piece of it is
still peeking out, because visible widgets are always allocated
at least 1x1. Work around this by setting child-visible to FALSE
in this situation.
https://bugzilla.gnome.org/show_bug.cgi?id=724096
Matthias Clasen [Sun, 12 Oct 2014 22:15:23 +0000 (18:15 -0400)]
GtkColorSwatch: Avoid style context underflow
The last change accidentally removed the later restore, and
left the earlier, so we ended up with a restore-save sequence.
Thankfully, GtkStyleContext warns about this.
Dušan Kazik [Sun, 12 Oct 2014 21:06:29 +0000 (21:06 +0000)]
Updated Slovak translation
Piotr Drąg [Sun, 12 Oct 2014 13:06:38 +0000 (15:06 +0200)]
Updated POTFILES.in and POTFILES.skip
Matthias Clasen [Sun, 12 Oct 2014 02:04:57 +0000 (22:04 -0400)]
inspector: Bring the selector back
Make it a separate page instead of the old button path.
Benjamin Otte [Sun, 12 Oct 2014 03:51:11 +0000 (05:51 +0200)]
examples: Add deprecation guards
Apparently it's not possible in GtkTextView to say "this style should
apply to all text, including newly inserted text. Or I'm just too stupid
to use its API.
So instead, keep using override_color().
Benjamin Otte [Sun, 12 Oct 2014 03:27:27 +0000 (05:27 +0200)]
tests: Update testexpand example for deprecations
Benjamin Otte [Sun, 12 Oct 2014 03:21:01 +0000 (05:21 +0200)]
tests: Update testtooltips for deprecations
Benjamin Otte [Sun, 12 Oct 2014 03:15:23 +0000 (05:15 +0200)]
tests: Don't force black background in testwindows
Benjamin Otte [Sun, 12 Oct 2014 03:08:54 +0000 (05:08 +0200)]
tests: Update testoverlaystyleclass test
Make it not use deprecations anymore and use CSS to show things work by
changing border-radius when a style class exists.
Benjamin Otte [Sun, 12 Oct 2014 02:54:40 +0000 (04:54 +0200)]
testgtk: Don't trigger deprecation warnings
.. and various other assorted fixes, mostly related to drawing code that
assumed stuff wasn't transparent by default.
Benjamin Otte [Sun, 12 Oct 2014 02:50:40 +0000 (04:50 +0200)]
gdk: Deprecate compositing support
We might want to remove support for it completely and always return
FALSE.
Carlos Soriano [Sun, 12 Oct 2014 01:55:39 +0000 (03:55 +0200)]
gtkplacessidebar: Fix commit
f6870e5b79fd9ab
Commit
f6870e5b79fd9ab introduced a some memory leaks and could be
improved in some areas.
Fix the memory leaks and apply the improvements.
https://bugzilla.gnome.org/show_bug.cgi?id=737983
Benjamin Otte [Sat, 11 Oct 2014 23:40:41 +0000 (01:40 +0200)]
configure: Require glib 2.43
Benjamin Otte [Sat, 11 Oct 2014 01:32:28 +0000 (03:32 +0200)]
colorswatch: Remove unneeded save/restore
for both style context and cairo context.
Benjamin Otte [Sat, 11 Oct 2014 00:40:48 +0000 (02:40 +0200)]
menu: Respect borders properly for scroll arrows
Yosef Or Boczko [Sat, 11 Oct 2014 22:11:36 +0000 (01:11 +0300)]
Updated Hebrew translation
Yosef Or Boczko [Sat, 11 Oct 2014 22:11:26 +0000 (01:11 +0300)]
Updated POTFILES.in
Matthias Clasen [Sat, 11 Oct 2014 21:58:31 +0000 (17:58 -0400)]
inspector: Some improvements for statistics
Show the last two snapshots, plus a delta.
Matthias Clasen [Fri, 10 Oct 2014 03:34:59 +0000 (23:34 -0400)]
inspector: Add a tab for object counts
This can be useful in finding leaks.
https://bugzilla.gnome.org/show_bug.cgi?id=738272
Piotr Drąg [Sat, 11 Oct 2014 15:57:42 +0000 (17:57 +0200)]
Updated POTFILES.in and POTFILES.skip
Lapo Calamandrei [Sat, 11 Oct 2014 12:37:16 +0000 (14:37 +0200)]
Adwaita: fix the special cased sidebar scrollbar...
...which I broke with the latest commit.
Lapo Calamandrei [Sat, 11 Oct 2014 12:31:08 +0000 (14:31 +0200)]
Adwaita: finally kill the scrollbar junction frame...
See https://bugzilla.gnome.org/show_bug.cgi?id=737981
Matthias Clasen [Sat, 11 Oct 2014 12:28:55 +0000 (08:28 -0400)]
GtkToolButton: Apply expected button style classes
Add .image-button or .text-button to the button within,
so our css works as expected for toolbar buttons too.
Matthias Clasen [Sat, 11 Oct 2014 12:15:07 +0000 (08:15 -0400)]
inspector: Cosmetics
Add .image-button to the tool buttons in the CSS editor - still
not square.
Matthias Clasen [Sat, 11 Oct 2014 12:07:04 +0000 (08:07 -0400)]
inspector: Remove a stray separator
Matthias Clasen [Sat, 11 Oct 2014 12:01:57 +0000 (08:01 -0400)]
inspector: Make the window smaller
No need for 1000 pixels of with anymore, after the reorg.
Matthias Clasen [Sat, 11 Oct 2014 11:55:25 +0000 (07:55 -0400)]
inspector: Make resource list columns resizable
This tree has the potential to be deep, and contain long
names, so it forces the window to be wide, unless we
allow the columns to shrink.